import Main from '@/components/main/Index.vue'
import viewAnimate from '@/components/viewAnimate.vue'
import anchorList from '@/components/anchorList.vue'
import Matrix from '@/components/Matrix.vue'
import Matrix2 from '@/components/Matrix2.vue'

const view = url => () => import(`@/views/${url}.vue`)
export default [
  {
    path: '/person',
    name: 'person',
    meta: { showTitle: '师晓栋 | 简历' },
    component: view('person/Index')
  },
  {
    path: '/',
    name: 'main',
    redirect: '/home',
    component: Main,
    children: [
      {
        path: 'home',
        name: 'home',
        meta: {
          hideMenu: false,
          title: '首页',
          icon: 'el-icon-house'
        },
        component: view('home/Index')
      }
    ]
  },
  {
    path: '/',
    name: 'main',
    component: Main,
    children: [
      {
        path: 'view_animate',
        name: 'view_animate',
        meta: {
          hideMenu: false,
          title: '视口动画',
          icon: 'el-icon-picture-outline-round'
        },
        component: viewAnimate
      }
    ]
  },
  {
    path: '/',
    name: 'main',
    component: Main,
    children: [
      {
        path: 'point_list',
        name: 'point_list',
        meta: {
          hideMenu: false,
          title: '锚点目录',
          icon: 'el-icon-notebook-2'
        },
        component: anchorList
      }
    ]
  },
  {
    path: '/',
    name: 'collect',
    component: Main,
    meta: {
      hideMenu: false,
      title: '收藏',
      icon: 'el-icon-folder',
      index: '1'
    },
    children: [
      {
        path: 'Matrix1',
        name: 'Matrix1',
        meta: {
          hideMenu: false,
          title: '黑客帝国one'
        },
        component: Matrix
      },
      {
        path: 'Matrix2',
        name: 'Matrix2',
        meta: {
          hideMenu: false,
          title: '黑客帝国two'
        },
        component: Matrix2
      },
      {
        path: 'lotto',
        name: 'lotto',
        meta: {
          hideMenu: false,
          title: '呼吸灯抽奖'
        },
        component: view('lotto/Index')
      },
      {
        path: 'pokonyan',
        name: 'pokonyan',
        meta: {
          hideMenu: false,
          title: '叮当猫效果'
        },
        component: view('pokonyan/Index')
      },
      {
        path: 'animate',
        name: 'animate',
        meta: {
          hideMenu: false,
          title: '动画效果'
        },
        component: view('animate/Index')
      }
    ]
  },
  {
    path: '/',
    name: 'main',
    component: Main,
    children: [
      {
        path: 'markdown',
        name: 'markdown',
        meta: {
          hideMenu: false,
          title: 'markdown',
          icon: 'el-icon-edit'
        },
        component: view('editor/markdown/Index')
      }
    ]
  },
  {
    path: '/',
    name: 'main',
    component: Main,
    children: [
      {
        path: 'cropper',
        name: 'cropper',
        meta: {
          hideMenu: true,
          title: '图片裁剪上传',
          icon: 'el-icon-edit'
        },
        component: view('uploadImg/Index')
      }
    ]
  },
  {
    path: '/',
    name: 'main',
    component: Main,
    children: [
      {
        path: 'falls',
        name: 'falls',
        meta: {
          hideMenu: false,
          title: '瀑布流',
          icon: 'el-icon-edit'
        },
        component: view('falls/Index')
      }
    ]
  }
]
